package com.javaspeak.designpatterns.go4.creational.singleton;

import com.javaspeak.designpatterns.go4.creational.prototype.Shape;

/**
 * Square
 *
 * @author John Dickerson
 */
public class Square extends Shape {

    /**
     * Constructor pretending to do some expensive initialisation
     */
    public Square(){

        StringBuilder sb = new StringBuilder();
        sb.append( "xxxx\n" );
        sb.append( "x  x\n" );
        sb.append( "x  x\n" );
        sb.append( "xxxx\n" );

        this.pixels = sb.toString();
    }
}
